package com.liveneo.adapter.mobile.web.controller;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import net.sf.json.JSONArray;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.ModelAttribute;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import com.liveneo.adapter.base.entity.PrpmDictDetail;
import com.liveneo.adapter.base.entity.PrpmLossItem;
import com.liveneo.adapter.base.entity.PrpmOcrDriverLicense;
import com.liveneo.adapter.base.entity.PrpmOcrPayee;
import com.liveneo.adapter.base.entity.PrpmProvince;
import com.liveneo.adapter.base.support.AdapterConstants;
import com.liveneo.adapter.base.support.BaseController;
import com.liveneo.adapter.base.support.LogUtils;
import com.liveneo.adapter.mobile.model.dto.ConstantDto;
import com.liveneo.adapter.mobile.model.dto.DepartLicenseDto;
import com.liveneo.adapter.mobile.model.dto.DriveLicenseDto;
import com.liveneo.adapter.mobile.model.dto.MobileLossItemDto;
import com.liveneo.adapter.mobile.model.dto.OcrConstantDto;
import com.liveneo.adapter.mobile.model.dto.OcrConstantSonDto;
import com.liveneo.adapter.mobile.model.dto.PayeeBankDto;
import com.liveneo.adapter.mobile.model.dto.PayeeIDDto;
import com.liveneo.adapter.mobile.model.request.BranchBankRequest;
import com.liveneo.adapter.mobile.model.request.LossOcrInfoRequest;
import com.liveneo.adapter.mobile.model.request.LossOcrListRequest;
import com.liveneo.adapter.mobile.model.request.OcrConstantRequest;
import com.liveneo.adapter.mobile.model.request.OcrDriverLicenseRequest;
import com.liveneo.adapter.mobile.model.request.OcrImageRequest;
import com.liveneo.adapter.mobile.model.request.OcrPayeeInfoRequest;
import com.liveneo.adapter.mobile.model.response.BranchBankResponse;
import com.liveneo.adapter.mobile.model.response.LossOcrInfoResponse;
import com.liveneo.adapter.mobile.model.response.LossOcrListResponse;
import com.liveneo.adapter.mobile.model.response.OcrConstantResponse;
import com.liveneo.adapter.mobile.model.response.OcrDriverLicenseResponse;
import com.liveneo.adapter.mobile.model.response.OcrImageResponse;
import com.liveneo.adapter.mobile.model.response.OcrPayeeInfoResponse;
import com.liveneo.adapter.mobile.service.BankService;
import com.liveneo.adapter.mobile.service.MobileLossService;
import com.liveneo.adapter.mobile.service.MobileOcrDrivelicenseService;
import com.liveneo.adapter.mobile.service.MobileOcrImageService;
import com.liveneo.adapter.mobile.service.MobileOcrPayeeService;
import com.liveneo.adapter.mobile.service.OcrClaimService;
import com.liveneo.adapter.mobile.service.ProvinceService;
import com.liveneo.adapter.mobile.support.MobileReturnCodeSupport;
import com.liveneo.adapter.mobile.util.Constant;
import com.liveneo.adapter.mobile.util.UUIDUtils;
import com.liveneo.adapter.outinterface.util.ResultInfo;
import com.liveneo.adapter.outinterface.web.platform.response.ResponseBranchInfo;
import com.liveneo.system.base.utils.JsonUtils;

/**
 * @Desc：移动端损失项相关接口
 * @Title：MobileOcrLossController
 * @address: http://www.liveneo.com.cn/
 * @author: zhaoyy
 * @version: 1.0 
 * @date: 2016年10月14日 上午10:05:18
 */
@Controller
@RequestMapping("/mobile")
public class MobileOcrLossController extends BaseController {
    @Autowired
    private MobileLossService            mobileLossService;
    @Autowired
    private MobileOcrPayeeService        ocrPayeeService;
    @Autowired
    private MobileOcrDrivelicenseService ocrDrivelicenseService;
    @Autowired
    private BankService                  bankService;
    @Autowired
    private ProvinceService              provinceService;
    @Autowired
    private MobileOcrImageService        ocrImageService;
    @Autowired
    private OcrClaimService              ocrClaimService;

    /**
     * MP42
     * @Desc: 根据案件号获取损失项列表【OCR采集-损失项车辆列表】
     * @Title: 获取案件损失项信息
     * @Author: zhaoyy 2016年10月14日 上午10:02:49
     * @param data
     * @return
     */
    @ResponseBody
    @RequestMapping("/getOcrLossList.action")
    public String getOcrLossList(@ModelAttribute(AdapterConstants.MOBILE_REQUEST_PARAM_NAME) String data) {
        String loguuid = UUIDUtils.getUUIDStr();
        String logTitle = "MP42入参=" + loguuid;
        LossOcrListRequest request = JsonUtils.fromJsonWithBase64(logTitle, data, LossOcrListRequest.class);
        LossOcrListResponse response = null;
        String result = "";
        // 比旧版本新增两个参数userCode和CaseUuid，该参数是否需要做相关操作
        String caseNo = request.getCaseNo();        // 案件号
        String userCode = request.getUserCode();    // 查勘员代码
        String caseUuid = request.getCaseUuid();    // 案件唯一标识
        try {
            if (StringUtils.isBlank(caseNo) || StringUtils.isBlank(userCode)) {
                response = MobileReturnCodeSupport.buildReponse(MobileReturnCodeSupport.CODE_NOVALID_PARAM, MobileReturnCodeSupport.SYS_CODE,
                        MobileReturnCodeSupport.CODE_PARAM_NO_NOT, LossOcrListResponse.class);
            } else {
                List<PrpmLossItem> prpmLossItemList = mobileLossService.getLossItemByCaseNo(userCode, caseNo, caseUuid);// 查询未确认过的损失项
                List<MobileLossItemDto> lossList = new ArrayList<MobileLossItemDto>();
                if (prpmLossItemList != null && prpmLossItemList.size() > 0) {
                    // lossid不等于0和7
                    for (PrpmLossItem prpmLossItem : prpmLossItemList) {
                        int lossType = prpmLossItem.getLossType();
                        if (lossType != 3 && lossType != 7) {
                            MobileLossItemDto prpmLossItemDto = new MobileLossItemDto();
                            prpmLossItemDto.setCaseUuid(prpmLossItem.getCaseInfoId());
                            prpmLossItemDto.setLossType(prpmLossItem.getLossType() + "");
                            prpmLossItemDto.setLossId(String.valueOf(prpmLossItem.getLossId()));
                            prpmLossItemDto.setObjectName(prpmLossItem.getLossName());
                            prpmLossItemDto.setCaseNo(prpmLossItem.getCaseNo());
                            prpmLossItemDto.setOwerName(prpmLossItem.getContact());
                            prpmLossItemDto.setLossStatus(prpmLossItem.getLossStatus() + "");
                            prpmLossItemDto.setLossUuid(prpmLossItem.getLossItemId());
                            lossList.add(prpmLossItemDto);
                        }
                    }
                }
                // 返回结果
                response = MobileReturnCodeSupport.buildReponse(MobileReturnCodeSupport.CODE_SUCCESS, MobileReturnCodeSupport.SYS_CODE, null,
                        LossOcrListResponse.class);
                response.setOcrlossItemDtoList(lossList);
            }
        } catch (Exception e) {
            LogUtils.error("MP42获取案件损失项信息==>错误信息:", e);
            response = MobileReturnCodeSupport.buildReponse(MobileReturnCodeSupport.CODE_INTERNAL_ERROR, MobileReturnCodeSupport.SYS_CODE, null,
                    LossOcrListResponse.class);
        } finally {
            result = decorateResult("MP42获取案件损失项信息,", response);
        }
        return result;
    }

    /**
     * MP41
     * @Desc: 查询OCR收集的信息
     * @Title: 获取ocr收集信息
     * @Author: zhaoyy 2016年10月14日 上午10:01:25
     * @param data
     * @return
     */
    @ResponseBody
    @RequestMapping("/getOcrInfo.action")
    public String getOcrInfo(@ModelAttribute(AdapterConstants.MOBILE_REQUEST_PARAM_NAME) String data) {
        String loguuid = UUIDUtils.getUUIDStr();
        String logTitle = "MP41入参=" + loguuid;
        LossOcrInfoRequest request = JsonUtils.fromJsonWithBase64(logTitle, data, LossOcrInfoRequest.class); // 解析请求参数
        LossOcrInfoResponse response = null;
        String result = "";
        String caseNo = request.getCaseNo();        // 案件号
        String infoType = request.getInfoType();    // 信息类型
        String caseUuid = request.getCaseUuid();    // 案件唯一标识
        String lossUuid = request.getLossUuid();    // 损失项唯一标识
        // 比旧版本多了CaseUuid和LossUuid,是否需要对该参数进行操作
        try {
            if (StringUtils.isBlank(caseNo) || StringUtils.isBlank(infoType) || StringUtils.isBlank(caseUuid) || StringUtils.isBlank(lossUuid)) {
                response = MobileReturnCodeSupport.buildReponse(MobileReturnCodeSupport.CODE_NOVALID_PARAM, MobileReturnCodeSupport.SYS_CODE,
                        MobileReturnCodeSupport.CODE_PARAM_NO_NOT, LossOcrInfoResponse.class);
            } else {
                // 0、身份证 1、银行卡 2、驾驶证 3、行驶证
                if ("0".equals(infoType)) {
                    PrpmOcrPayee params = new PrpmOcrPayee();
                    params.setCaseNo(caseNo);
                    params.setCaseInfoId(caseUuid);
                    params.setLossItemId(lossUuid);
                    /** 查询领款人信息 */
                    PrpmOcrPayee res = ocrPayeeService.selectPayeeByCaseNo(params);
                    /** 封装领款人身份证信息 */
                    PayeeIDDto payId = new PayeeIDDto();
                    if (res != null) {
                        payId.setPayeeName(res.getPayeeName());
                        payId.setPayeeCard(res.getPayeeCard());
                        payId.setInsuredPhone(res.getInsuredPhone());
                        payId.setValidCardDate(res.getValidCardDate());
                        // 返回信息
                        response = MobileReturnCodeSupport.buildReponse(MobileReturnCodeSupport.CODE_SUCCESS, MobileReturnCodeSupport.SYS_CODE, null,
                                LossOcrInfoResponse.class);
                        // 通用信息
                        response.setCaseNo(res.getCaseNo());
                        response.setCaseUuid(res.getCaseInfoId());
                        // response.setLossId(res.getLossId());
                        response.setLossUuid(res.getLossItemId());
                        // 领款人身份证信息
                        response.setPayeeIDInfo(payId);
                    } else {
                        response = MobileReturnCodeSupport.buildReponse(MobileReturnCodeSupport.CODE_SUCCESS, MobileReturnCodeSupport.SYS_CODE, null,
                                LossOcrInfoResponse.class);
                        response.setPayeeIDInfo(payId);
                    }
                } else if ("1".equals(infoType)) {
                    PrpmOcrPayee params = new PrpmOcrPayee();
                    params.setCaseNo(caseNo);
                    params.setCaseInfoId(caseUuid);
                    params.setLossItemId(lossUuid);
                    /** 查询领款人信息 */
                    PrpmOcrPayee res = ocrPayeeService.selectPayeeByCaseNo(params);
                    /** 封装领款人银行卡信息 */
                    PayeeBankDto bank = new PayeeBankDto();
                    if (res != null) {
                        bank.setPayeeName(res.getPayeeName());
                        bank.setBank(res.getBank());
                        bank.setBranchBankCode(res.getBranchBankCode());
                        bank.setBankCard(res.getBankCard());
                        bank.setCardType(res.getCardType());
                        bank.setProvince(res.getProvince());
                        bank.setCity(res.getCity());
                        bank.setBankCode(res.getBankCode());
                        bank.setBranchBank(res.getBranchBank());
                        bank.setProvinceCode(res.getProvinceCode());
                        bank.setCityCode(res.getCityCode());
                        // 返回信息
                        response = MobileReturnCodeSupport.buildReponse(MobileReturnCodeSupport.CODE_SUCCESS, MobileReturnCodeSupport.SYS_CODE, null,
                                LossOcrInfoResponse.class);
                        // 通用信息
                        response.setCaseNo(res.getCaseNo());
                        response.setCaseUuid(res.getCaseInfoId());
                        // response.setLossId(res.getLossId());
                        response.setLossUuid(res.getLossItemId());
                        // 领款人银行卡信息
                        response.setPayeeBankInfo(bank);
                    } else {
                        response = MobileReturnCodeSupport.buildReponse(MobileReturnCodeSupport.CODE_SUCCESS, MobileReturnCodeSupport.SYS_CODE, null,
                                LossOcrInfoResponse.class);
                        response.setPayeeBankInfo(bank);
                    }
                } else if ("2".equals(infoType)) {
                    String lossType = request.getLossType();        // 损失类型
                    String lossId = request.getLossId();            // 任务号
                    if (StringUtils.isBlank(lossType) || StringUtils.isBlank(lossId) || StringUtils.isBlank(lossUuid)) {
                        response = MobileReturnCodeSupport.buildReponse(MobileReturnCodeSupport.CODE_FAIL, MobileReturnCodeSupport.SYS_CODE, "参数为空或不完整，请检查参数！",
                                LossOcrInfoResponse.class);
                    } else {
                        /** 驾驶证行驶证收集 */
                        PrpmOcrDriverLicense params = new PrpmOcrDriverLicense();
                        params.setCaseNo(caseNo);
                        // params.setLossType(lossType);
                        params.setLossId(lossId);
                        params.setLossItemId(lossUuid);
                        PrpmOcrDriverLicense res = ocrDrivelicenseService.selectDrivelicenseByCaseNo(params);
                        /** 封装驾驶证信息 */
                        DriveLicenseDto drive = new DriveLicenseDto();
                        if (res != null) {
                            drive.setDriverLicense(res.getDriverLicense());
                            drive.setDriver(res.getDriver());
                            drive.setPermDrive(res.getPermDrive());
                            drive.setFirstDate(res.getFirstDate());
                            drive.setEffectiveDate(res.getEffectiveDate());
                            drive.setValidity(res.getValidity());
                            drive.setFileNo(res.getFileNo());
                            // 返回结果
                            response = MobileReturnCodeSupport.buildReponse(MobileReturnCodeSupport.CODE_SUCCESS, MobileReturnCodeSupport.SYS_CODE, null,
                                    LossOcrInfoResponse.class);
                            /** 返回信息 */
                            response.setCaseNo(res.getCaseNo());
                            response.setCaseUuid(res.getCaseInfoId());
                            response.setLossId(res.getLossId());
                            response.setLossUuid(res.getLossItemId());
                            response.setLossType(request.getLossType());
                            response.setObjectName(res.getLicensePlate()); // 车牌号
                            // 驾驶证信息
                            response.setDriveLicenseInfo(drive);
                        } else {
                            response = MobileReturnCodeSupport.buildReponse(MobileReturnCodeSupport.CODE_SUCCESS, MobileReturnCodeSupport.SYS_CODE, null,
                                    LossOcrInfoResponse.class);
                            response.setDriveLicenseInfo(drive);
                        }
                    }
                } else if ("3".equals(infoType)) {
                    String lossType = request.getLossType();        // 损失类型
                    String lossId = request.getLossId();            // 任务号
                    if (StringUtils.isBlank(lossType) || StringUtils.isBlank(lossId)) {
                        response = MobileReturnCodeSupport.buildReponse(MobileReturnCodeSupport.CODE_FAIL, MobileReturnCodeSupport.SYS_CODE, "参数为空或不完整，请检查参数！",
                                LossOcrInfoResponse.class);
                    } else {
                        /** 驾驶证行驶证收集 */
                        PrpmOcrDriverLicense params = new PrpmOcrDriverLicense();
                        params.setCaseNo(caseNo);
                        // params.setLossType(lossType);
                        params.setLossId(lossId);
                        params.setLossItemId(lossUuid);
                        PrpmOcrDriverLicense res = ocrDrivelicenseService.selectDrivelicenseByCaseNo(params);
                        /** 封装行驶证信息 **/
                        DepartLicenseDto depart = new DepartLicenseDto();
                        if (res != null) {
                            depart.setLicensePlate(res.getLicensePlate());
                            depart.setDrivingLicType(res.getDrivingLicType());
                            depart.setTestRecord(res.getTestRecord());
                            depart.setCarType(res.getCarType());
                            depart.setBandModel(res.getBandModel());
                            depart.setCarIdentification(res.getCarIdentification());
                            depart.setEngineCode(res.getEngineCode());
                            // depart.setInfoSources(res.getInfoSources());
                            depart.setRegistDate(res.getRegistDate());
                            depart.setIssueDate(res.getIssueDate());
                            // 返回结果
                            response = MobileReturnCodeSupport.buildReponse(MobileReturnCodeSupport.CODE_SUCCESS, MobileReturnCodeSupport.SYS_CODE, null,
                                    LossOcrInfoResponse.class);
                            /** 返回信息 */
                            response.setCaseNo(res.getCaseNo());
                            response.setCaseUuid(res.getCaseInfoId());
                            response.setLossId(res.getLossId());
                            response.setLossUuid(res.getLossItemId());
                            response.setLossType(request.getLossType());
                            response.setObjectName(res.getLicensePlate()); // 车牌号
                            // 行驶证信息
                            response.setDepartLicenseInfo(depart);
                        } else {
                            response = MobileReturnCodeSupport.buildReponse(MobileReturnCodeSupport.CODE_SUCCESS, MobileReturnCodeSupport.SYS_CODE, null,
                                    LossOcrInfoResponse.class);
                            response.setDepartLicenseInfo(depart);
                        }
                    }
                }
            }
        } catch (Exception e) {
            LogUtils.error("MP41获取ocr收集信息==>错误信息:", e);
            response = MobileReturnCodeSupport.buildReponse(MobileReturnCodeSupport.CODE_INTERNAL_ERROR, MobileReturnCodeSupport.SYS_CODE, null,
                    LossOcrInfoResponse.class);
        } finally {
            result = decorateResult("MP41获取ocr收集信息", response);
        }
        return result;
    }

    /**
     * MP40
     * @Desc: 根据所属银行、省市信息查询开户分行
     * @Title: 查询开户分行
     * @Author: zhaoyy 2016年10月14日 上午10:06:18
     * @param data
     * @return
     */
    @SuppressWarnings("unchecked")
    @ResponseBody
    @RequestMapping("/getOcrBranchBank.action")
    public String getOcrBranchBank(@ModelAttribute(AdapterConstants.MOBILE_REQUEST_PARAM_NAME) String data) {
        String loguuid = UUIDUtils.getUUIDStr();
        String logTitle = "MP40入参=" + loguuid;
        BranchBankRequest request = JsonUtils.fromJsonWithBase64(logTitle, data, BranchBankRequest.class); // 解析请求参数
        BranchBankResponse response = null;
        String result = "";
        String bank = request.getBankCode(); // 所属银行
        // String province = request.getProvinceCode(); // 省份 暂不用
        String city = request.getCityCode(); // 城市
        // 该接口需要调用对外的接口
        try {
            if (StringUtils.isBlank(bank) || StringUtils.isBlank(city)) {
                response = MobileReturnCodeSupport.buildReponse(MobileReturnCodeSupport.CODE_NOVALID_PARAM, MobileReturnCodeSupport.SYS_CODE,
                        MobileReturnCodeSupport.CODE_PARAM_NO_NOT, BranchBankResponse.class);
            } else {
                Long bankcode = Long.parseLong(bank);
                Long citycode = Long.parseLong(city);
                ResultInfo resultInfo = ocrClaimService.queryConstants(bankcode, citycode, loguuid);
                if (resultInfo.getResultCode() == "000" || "000".equals(resultInfo.getResultCode())) {
                    List<ConstantDto> ocrConstantDtos = new ArrayList<ConstantDto>();
                    if (resultInfo.getBranchInfo() != null && resultInfo.getBranchInfo().size() > 0) {
                        List<ResponseBranchInfo> gGgBanklocationsDto = resultInfo.getBranchInfo();
                        JSONArray array = JSONArray.fromObject(gGgBanklocationsDto);
                        @SuppressWarnings("deprecation")
                        List<ResponseBranchInfo> list = JSONArray.toList(array, ResponseBranchInfo.class);
                        for (ResponseBranchInfo dto : list) {
                            ConstantDto ocrConstantDto = new ConstantDto();
                            ocrConstantDto.setPid(dto.getCode());
                            ocrConstantDto.setPname(dto.getName());
                            ocrConstantDtos.add(ocrConstantDto);
                        }
                    }
                    // 返回结果
                    response = MobileReturnCodeSupport.buildReponse(MobileReturnCodeSupport.CODE_SUCCESS, MobileReturnCodeSupport.SYS_CODE, null,
                            BranchBankResponse.class);
                    response.setConstantList(ocrConstantDtos);
                } else {
                    response = MobileReturnCodeSupport.buildReponse2(MobileReturnCodeSupport.CODE_FAIL, MobileReturnCodeSupport.SYS_CODE,
                            resultInfo.getResultMsg(), BranchBankResponse.class);
                }
            }
        } catch (Exception e) {
            LogUtils.error("MP40查询开户分行==>错误信息:", e);
            response = MobileReturnCodeSupport.buildReponse(MobileReturnCodeSupport.CODE_INTERNAL_ERROR, MobileReturnCodeSupport.SYS_CODE, null,
                    BranchBankResponse.class);
        } finally {
            result = decorateResult("MP40查询开户分行", response);
        }
        return result;
    }

    /**
     * MP39
     * @Desc: 获取所属银行、省份、城市等信息
     * @Title: 获取所属银行、省市等信息
     * @Author: zhaoyy 2016年10月14日 上午10:07:28
     * @param data
     * @return
     */
    @ResponseBody
    @RequestMapping("/getOcrConstant.action")
    public String getOcrConstant(@ModelAttribute(AdapterConstants.MOBILE_REQUEST_PARAM_NAME) String data) {
        String loguuid = UUIDUtils.getUUIDStr();
        String logTitle = "MP39入参=" + loguuid;
        OcrConstantRequest request = JsonUtils.fromJsonWithBase64(logTitle, data, OcrConstantRequest.class); // 解析请求参数
        OcrConstantResponse response = null;
        String result = "";
        String constantType = request.getConstantType(); // 参数类型
        try {
            List<OcrConstantDto> constantList = new ArrayList<OcrConstantDto>();
            if (StringUtils.isBlank(constantType)) {
                response = MobileReturnCodeSupport.buildReponse(MobileReturnCodeSupport.CODE_NOVALID_PARAM, MobileReturnCodeSupport.SYS_CODE,
                        MobileReturnCodeSupport.CODE_PARAM_NO_NOT, OcrConstantResponse.class);
            } else {
                // 0、所属银行；1、省市
                if ("0".equals(constantType)) {
                    PrpmDictDetail dictDetail = new PrpmDictDetail();
                    dictDetail.setDtCode(Constant.DICT_TYPE_BANK);
                    List<PrpmDictDetail> banks = bankService.selectByPrimaryDtCode(dictDetail);
                    for (PrpmDictDetail bank : banks) {
                        OcrConstantDto cdto = new OcrConstantDto();
                        cdto.setPname(bank.getDictName());
                        cdto.setPid(bank.getDictCode());
                        constantList.add(cdto);
                    }
                } else if ("1".equals(constantType)) {
                    List<PrpmProvince> provinces = provinceService.selectProvinceByPid(0);
                    for (PrpmProvince province : provinces) {
                        OcrConstantDto cdto = new OcrConstantDto();
                        cdto.setPname(province.getTitle());
                        cdto.setPid(province.getCode());
                        // 根据省份ID查询城市列表
                        List<PrpmProvince> subprovinces = provinceService.selectProvinceByProvinceId(province.getProvinceId());
                        List<OcrConstantSonDto> items = new ArrayList<OcrConstantSonDto>();
                        for (PrpmProvince subprovince : subprovinces) {
                            OcrConstantSonDto subdto = new OcrConstantSonDto();
                            subdto.setParentNode(province.getCode());
                            subdto.setSid(subprovince.getCode());
                            subdto.setSname(subprovince.getTitle());
                            items.add(subdto);
                        }
                        cdto.setItems(items);
                        constantList.add(cdto);
                    }
                    // 准驾车型
                } else if ("2".equals(constantType)) {
                    PrpmDictDetail dictDetail = new PrpmDictDetail();
                    dictDetail.setDtCode(Constant.DICT_TYPE_DRIVER_TYPE);
                    List<PrpmDictDetail> banks = bankService.selectByPrimaryDtCode(dictDetail);
                    for (PrpmDictDetail bank : banks) {
                        OcrConstantDto cdto = new OcrConstantDto();
                        cdto.setPname(bank.getDictName());
                        cdto.setPid(bank.getDictCode());
                        constantList.add(cdto);
                    }
                    // 车辆类型
                } else if ("3".equals(constantType)) {
                    PrpmDictDetail dictDetail = new PrpmDictDetail();
                    dictDetail.setDtCode(Constant.DICT_TYPE_LICENSE_PLATE);
                    List<PrpmDictDetail> banks = bankService.selectByPrimaryDtCode(dictDetail);
                    for (PrpmDictDetail bank : banks) {
                        OcrConstantDto cdto = new OcrConstantDto();
                        cdto.setPname(bank.getDictName());
                        cdto.setPid(bank.getDictCode());
                        constantList.add(cdto);
                    }
                }
                // 返回结果
                response = MobileReturnCodeSupport.buildReponse(MobileReturnCodeSupport.CODE_SUCCESS, MobileReturnCodeSupport.SYS_CODE, null,
                        OcrConstantResponse.class);
                response.setConstantList(constantList);
            }
        } catch (Exception e) {
            LogUtils.error("MP39获取所属银行、省市等信息==>错误信息:", e);
            response = MobileReturnCodeSupport.buildReponse(MobileReturnCodeSupport.CODE_INTERNAL_ERROR, MobileReturnCodeSupport.SYS_CODE, null,
                    OcrConstantResponse.class);
        } finally {
            result = decorateResult("MP39获取所属银行、省市等信息", response);
        }
        return result;
    }

    /**
     * MP38
     * @Desc: 身份证、银行卡、驾驶证、行驶证、临牌等照片上传
     * @Title: OCR采集-图片上传
     * @Author: zhaoyy 2016年10月14日 上午10:08:54
     * @param data
     * @return
     */
    @ResponseBody
    @RequestMapping("/uploadOcrImageServlet.action")
    public String uploadOcrImageServlet(@ModelAttribute(AdapterConstants.MOBILE_REQUEST_PARAM_NAME) String data) {
        String loguuid = UUIDUtils.getUUIDStr();
        String logTitle = "MP38入参=" + loguuid;
        OcrImageRequest request = JsonUtils.fromJsonWithBase64(logTitle, data, OcrImageRequest.class); // 解析请求参数
        OcrImageResponse response = null;
        String result = "";
        String caseUuid = request.getCaseUuid();        // 案件唯一标识
        String caseNo = request.getCaseNo();            // 案件号
        String lossUuid = request.getLossUuid();        // 损失项唯一标识
        String ossKey = request.getOSSKey();            // OSSKEY
        String userCode = request.getUserCode();        // 用户编码
        // 此处对应的数据库缺少 fileFlag 和 lossId字段
        try {
            if (StringUtils.isBlank(caseUuid) || StringUtils.isBlank(caseNo) || StringUtils.isBlank(lossUuid) || StringUtils.isBlank(userCode)
                    || StringUtils.isBlank(ossKey)) {
                response = MobileReturnCodeSupport.buildReponse(MobileReturnCodeSupport.CODE_NOVALID_PARAM, MobileReturnCodeSupport.SYS_CODE,
                        MobileReturnCodeSupport.CODE_PARAM_NO_NOT, OcrImageResponse.class);
            } else {
                ResultInfo resultInfo = ocrClaimService.upoadImage(request, loguuid);
                if (resultInfo.getResultCode() == "000" || "000".equals(resultInfo.getResultCode())) { // 调用理赔核心 成功存库
                    ocrImageService.saveOcrImage(request); // 存库
                    response = MobileReturnCodeSupport.buildReponse(MobileReturnCodeSupport.CODE_SUCCESS, MobileReturnCodeSupport.SYS_CODE, null,
                            OcrImageResponse.class);
                } else {
                    response = MobileReturnCodeSupport.buildReponse2(MobileReturnCodeSupport.CODE_FAIL, MobileReturnCodeSupport.SYS_CODE,
                            resultInfo.getResultMsg(), OcrImageResponse.class);
                }
            }
        } catch (Exception e) {
            LogUtils.error("MP38OCR采集-图片上传==>错误信息:", e);
            response = MobileReturnCodeSupport.buildReponse(MobileReturnCodeSupport.CODE_INTERNAL_ERROR, MobileReturnCodeSupport.SYS_CODE, null,
                    OcrImageResponse.class);
        } finally {
            result = decorateResult("MP38OCR采集-图片上传", response);
        }
        return result;
    }

    /**
     * MP37
     * @Desc: 行驶证（临牌）收集
     * @Title: 行驶证（临牌）收集
     * @Author: zhaoyy 2016年10月14日 上午10:09:39
     * @param data
     * @return
     */
    @ResponseBody
    @RequestMapping("/addOcrDriverLicense.action")
    public String addOcrDriverLicense(@ModelAttribute(AdapterConstants.MOBILE_REQUEST_PARAM_NAME) String data) {
        String loguuid = UUIDUtils.getUUIDStr();
        String logTitle = "MP37入参=" + loguuid;
        OcrDriverLicenseRequest request = JsonUtils.fromJsonWithBase64(logTitle, data, OcrDriverLicenseRequest.class); // 解析请求参数
        OcrDriverLicenseResponse response = null;
        String result = "";
        String caseUuid = request.getCaseUuid();        // 案件唯一标识
        String lossUuid = request.getLossUuid();
        String lossId = request.getLossId();
        String lossType = request.getLossType();
        try {
            if (StringUtils.isBlank(caseUuid) || StringUtils.isBlank(lossUuid) || StringUtils.isBlank(lossId) || StringUtils.isBlank(lossType)) {
                response = MobileReturnCodeSupport.buildReponse(MobileReturnCodeSupport.CODE_NOVALID_PARAM, MobileReturnCodeSupport.SYS_CODE,
                        MobileReturnCodeSupport.CODE_PARAM_NO_NOT, OcrDriverLicenseResponse.class);
            } else {
                Map<String, Object> params = new HashMap<String, Object>();
                // params.put("caseNo", request.getCaseNo());
                params.put("lossUuid", request.getLossUuid());
                // params.put("lossType", request.getLossType());
                params.put("lossId", request.getLossId());
                // params.put("caseUuid", caseUuid);
                // 1、根据案件唯一标识查询领款人信息
                PrpmOcrDriverLicense ocrDriverLicense = ocrDrivelicenseService.getOcrDriverLicenseByCaseUuid(params);
                // 行驶证 type 1:驾驶证信息；2：行驶证信息 3：身份证信息；4：银行信息
                String type = "2";  // 调用核心
                ResultInfo resultInfo = ocrClaimService.uploadOCRinfo(null, request, loguuid, type); // 更改驾驶证行驶证信息
                if (resultInfo.getResultCode() == "000" || "000".equals(resultInfo.getResultCode())) { // 调用核心成功
                    if (ocrDriverLicense != null) { // 更新
                        // 更新行驶证信息 如果是1则更新行驶证信息
                        ocrDrivelicenseService.updateOcrDriverLicense(ocrDriverLicense, request, 1);// 保存行驶证信息
                    } else { // 新增
                        // 保存行驶证信息 如果是1则保存行驶证信息
                        ocrDrivelicenseService.saveOcrDriverLicense(request, 1);// 保存行驶证信息
                    }
                    response = MobileReturnCodeSupport.buildReponse(MobileReturnCodeSupport.CODE_SUCCESS, MobileReturnCodeSupport.SYS_CODE, null,
                            OcrDriverLicenseResponse.class);
                } else {
                    response = MobileReturnCodeSupport.buildReponse2(MobileReturnCodeSupport.CODE_FAIL, MobileReturnCodeSupport.SYS_CODE,
                            resultInfo.getResultMsg(), OcrDriverLicenseResponse.class);
                }
            }
        } catch (Exception e) {
            LogUtils.error("MP37行驶证（临牌）收集==>错误信息:", e);
            response = MobileReturnCodeSupport.buildReponse(MobileReturnCodeSupport.CODE_INTERNAL_ERROR, MobileReturnCodeSupport.SYS_CODE, null,
                    OcrDriverLicenseResponse.class);
        } finally {
            result = decorateResult("MP37行驶证（临牌）收集", response);
        }
        return result;
    }

    /**
     * MP64
     * @Desc: 驾驶证收集（原MP37）
     * @Title: 驾驶证收集
     * @Author: zhaoyy 2016年10月14日 上午10:10:21
     * @param data
     * @return
     */
    @ResponseBody
    @RequestMapping("/addOcrDriverLicense2.action")
    public String addOcrDriverLicense2(@ModelAttribute(AdapterConstants.MOBILE_REQUEST_PARAM_NAME) String data) {
        String loguuid = UUIDUtils.getUUIDStr();
        String logTitle = "MP64入参=" + loguuid;
        OcrDriverLicenseRequest request = JsonUtils.fromJsonWithBase64(logTitle, data, OcrDriverLicenseRequest.class); // 解析请求参数
        OcrDriverLicenseResponse response = null;
        String result = "";
        String caseUuid = request.getCaseUuid();        // 案件唯一标识
        String lossId = request.getLossId();
        String lossUuid = request.getLossUuid();
        try {
            if (StringUtils.isBlank(caseUuid) || StringUtils.isBlank(lossId) || StringUtils.isBlank(lossUuid)) {
                response = MobileReturnCodeSupport.buildReponse(MobileReturnCodeSupport.CODE_NOVALID_PARAM, MobileReturnCodeSupport.SYS_CODE,
                        MobileReturnCodeSupport.CODE_PARAM_NO_NOT, OcrDriverLicenseResponse.class);
            } else {
                Map<String, Object> params = new HashMap<String, Object>();
                // if(StringUtils.isNotBlank(request.getCaseNo()))
                // params.put("caseNo", request.getCaseNo());
                if (StringUtils.isNotBlank(request.getLossUuid())) params.put("lossUuid", request.getLossUuid());
                // if(StringUtils.isNotBlank(request.getLossType()))
                // params.put("lossType", request.getLossType());
                if (StringUtils.isNotBlank(request.getLossId())) params.put("lossId", request.getLossId());
                // params.put("caseUuid", caseUuid);
                // 1、根据案件唯一标识查询领款人信息
                PrpmOcrDriverLicense ocrDriverLicense = ocrDrivelicenseService.getOcrDriverLicenseByCaseUuid(params);
                // 行驶证 type 1:驾驶证信息；2：行驶证信息 3：身份证信息；4：银行信息
                String type = "1";  // 调用核心
                ResultInfo resultInfo = ocrClaimService.uploadOCRinfo(null, request, loguuid, type); // 更改驾驶证行驶证信息
                if (resultInfo.getResultCode() == "000" || "000".equals(resultInfo.getResultCode())) {   // 调用核心成功
                    if (ocrDriverLicense != null) { // 更新
                        // 更新行驶证信息 如果是1则更新行驶证信息 2 更新驾驶证信息
                        ocrDrivelicenseService.updateOcrDriverLicense(ocrDriverLicense, request, 2);// 保存驾驶证信息
                    } else { // 新增
                        // 保存行驶证信息 如果是1则保存行驶证信息 2 保存驾驶证信息
                        ocrDrivelicenseService.saveOcrDriverLicense(request, 2);// 保存驾驶证信息
                    }
                    response = MobileReturnCodeSupport.buildReponse(MobileReturnCodeSupport.CODE_SUCCESS, MobileReturnCodeSupport.SYS_CODE, null,
                            OcrDriverLicenseResponse.class);
                } else {
                    response = MobileReturnCodeSupport.buildReponse2(MobileReturnCodeSupport.CODE_FAIL, MobileReturnCodeSupport.SYS_CODE,
                            resultInfo.getResultMsg(), OcrDriverLicenseResponse.class);
                }
            }
        } catch (Exception e) {
            LogUtils.error("MP64驾驶证收集==>错误信息:", e);
            response = MobileReturnCodeSupport.buildReponse(MobileReturnCodeSupport.CODE_INTERNAL_ERROR, MobileReturnCodeSupport.SYS_CODE, null,
                    OcrDriverLicenseResponse.class);
        } finally {
            result = decorateResult("MP64驾驶证收集", response);
        }
        return result;
    }

    /**
     * MP36
     * @Desc: 领款人身份证信息收集
     * @Title: 领款人身份证信息收集
     * @Author: zhaoyy 2016年10月14日 上午10:11:00
     * @param data
     * @return
     */
    @ResponseBody
    @RequestMapping("/addOcrPayeeInfo.action")
    public String addOcrPayeeInfo(@ModelAttribute(AdapterConstants.MOBILE_REQUEST_PARAM_NAME) String data) {
        String loguuid = UUIDUtils.getUUIDStr();
        String logTitle = "MP36入参=" + loguuid;
        OcrPayeeInfoRequest request = JsonUtils.fromJsonWithBase64(logTitle, data, OcrPayeeInfoRequest.class); // 解析请求参数
        OcrPayeeInfoResponse response = null;
        String result = "";
        String caseUuid = request.getCaseUuid();        // 案件唯一标识
        String lossUuid = request.getLossUuid();
        try {
            if (StringUtils.isBlank(caseUuid) || StringUtils.isBlank(lossUuid)) {
                response = MobileReturnCodeSupport.buildReponse(MobileReturnCodeSupport.CODE_NOVALID_PARAM, MobileReturnCodeSupport.SYS_CODE,
                        MobileReturnCodeSupport.CODE_PARAM_NO_NOT, OcrPayeeInfoResponse.class);
            } else {
                // 1、根据案件唯一标识查询领款人信息
                PrpmOcrPayee ocrPayee = ocrPayeeService.getOcrPayeeByLossUuid(lossUuid);
                // 身份证 type 1:驾驶证信息；2：行驶证信息 3：身份证信息；4：银行信息
                String type = "3";
                ResultInfo resultInfo = ocrClaimService.uploadOCRinfo(request, null, loguuid, type); // 根据案件号查询
                if (resultInfo.getResultCode() == "000" || "000".equals(resultInfo.getResultCode())) {   // 调用核心成功
                    if (ocrPayee != null) { // 更新
                        // 更新领款人信息 如果是1则更新领款人身份证信息
                        ocrPayeeService.updateOcrPayee(ocrPayee, request, 1);// 更新领款人信息
                    } else { // 新增
                        // 保存领款人信息 如果是1则保存领款人身份证信息
                        ocrPayeeService.saveOcrPayee(request, 1);// 保存领款人
                    }
                    response = MobileReturnCodeSupport.buildReponse(MobileReturnCodeSupport.CODE_SUCCESS, MobileReturnCodeSupport.SYS_CODE, null,
                            OcrPayeeInfoResponse.class);
                } else {
                    response = MobileReturnCodeSupport.buildReponse2(MobileReturnCodeSupport.CODE_FAIL, MobileReturnCodeSupport.SYS_CODE,
                            resultInfo.getResultMsg(), OcrPayeeInfoResponse.class);
                }
            }
        } catch (Exception e) {
            LogUtils.error("MP36领款人身份证信息收集==>错误信息:", e);
            response = MobileReturnCodeSupport.buildReponse(MobileReturnCodeSupport.CODE_INTERNAL_ERROR, MobileReturnCodeSupport.SYS_CODE, null,
                    OcrPayeeInfoResponse.class);
        } finally {
            result = decorateResult("MP36领款人身份证信息收集", response);
        }
        return result;
    }

    /**
     * MP63
     * @Desc: 领款人银行卡信息收集（原MP36）
     * @Title: 领款人银行卡信息收集
     * @Author: zhaoyy 2016年10月14日 上午10:11:38
     * @param data
     * @return
     */
    @ResponseBody
    @RequestMapping("/addOcrIDCardInfo.action")
    public String addOcrIDCardInfo(@ModelAttribute(AdapterConstants.MOBILE_REQUEST_PARAM_NAME) String data) {
        String loguuid = UUIDUtils.getUUIDStr();
        String logTitle = "MP63入参=" + loguuid;
        OcrPayeeInfoRequest request = JsonUtils.fromJsonWithBase64(logTitle, data, OcrPayeeInfoRequest.class); // 解析请求参数
        OcrPayeeInfoResponse response = null;
        String result = "";
        String caseUuid = request.getCaseUuid();        // 案件唯一标识
        String cardType = request.getCardType();
        String lossUuid = request.getLossUuid();
        try {
            if (StringUtils.isBlank(caseUuid) || StringUtils.isBlank(cardType) || StringUtils.isBlank(lossUuid)) {
                response = MobileReturnCodeSupport.buildReponse(MobileReturnCodeSupport.CODE_NOVALID_PARAM, MobileReturnCodeSupport.SYS_CODE,
                        MobileReturnCodeSupport.CODE_PARAM_NO_NOT, OcrPayeeInfoResponse.class);
            } else {
                // 判断银行卡类型
                if ("借记卡".contains(cardType)) {
                    // 1、根据案件唯一标识查询领款人信息
                    PrpmOcrPayee ocrPayee = ocrPayeeService.getOcrPayeeByLossUuid(lossUuid);
                    // 身份证 type 1:驾驶证信息；2：行驶证信息 3：身份证信息；4：银行信息
                    String type = "4";
                    ResultInfo resultInfo = ocrClaimService.uploadOCRinfo(request, null, loguuid, type); // 根据案件号查询
                    if (resultInfo.getResultCode() == "000" || "000".equals(resultInfo.getResultCode())) {   // 调用核心成功
                        if (ocrPayee != null) { // 更新
                            // 更新领款人信息 如果是1则更新领款人身份证信息 2 更新领款人银行卡信息
                            ocrPayeeService.updateOcrPayee(ocrPayee, request, 2);// 更新领款人信息
                        } else { // 新增
                            // 保存领款人信息 如果是1则保存领款人身份证信息 2 保存领款人银行卡信息
                            ocrPayeeService.saveOcrPayee(request, 2);// 保存领款人
                        }
                        response = MobileReturnCodeSupport.buildReponse(MobileReturnCodeSupport.CODE_SUCCESS, MobileReturnCodeSupport.SYS_CODE, null,
                                OcrPayeeInfoResponse.class);
                    } else {
                        response = MobileReturnCodeSupport.buildReponse2(MobileReturnCodeSupport.CODE_FAIL, MobileReturnCodeSupport.SYS_CODE,
                                resultInfo.getResultMsg(), OcrPayeeInfoResponse.class);
                    }
                } else {
                    response = MobileReturnCodeSupport.buildReponse2(MobileReturnCodeSupport.CODE_FAIL, MobileReturnCodeSupport.SYS_CODE, "暂不支持信用卡！",
                            OcrPayeeInfoResponse.class);
                }
            }
        } catch (Exception e) {
            LogUtils.error("MP63领款人银行卡信息收集==>错误信息:", e);
            response = MobileReturnCodeSupport.buildReponse(MobileReturnCodeSupport.CODE_INTERNAL_ERROR, MobileReturnCodeSupport.SYS_CODE, null,
                    OcrPayeeInfoResponse.class);
        } finally {
            result = decorateResult("MP63领款人银行卡信息收集", response);
        }
        return result;
    }

    public Boolean checkHz(String hz) {
        Boolean flag = false;
        Pattern p_str = Pattern.compile("[\\u4e00-\\u9fa5]+");
        Matcher m = p_str.matcher(hz);
        if (m.find() && m.group(0).equals(hz)) {
            flag = true;
        }
        return flag;
    }

    /**
     * MP69
     * @Desc: 查询OCR收集信息的录入情况
     * @Title: 查询OCR收集信息的录入情况
     * @Author: rex 2016年11月11日 
     * @param data
     * @return
     */
    @ResponseBody
    @RequestMapping("/getOcrInfoStatus.action")
    public String getOcrInfoStatus(@ModelAttribute(AdapterConstants.MOBILE_REQUEST_PARAM_NAME) String data) {
        String loguuid = UUIDUtils.getUUIDStr();
        String logTitle = "MP69入参=" + loguuid;
        LossOcrInfoRequest request = JsonUtils.fromJsonWithBase64(logTitle, data, LossOcrInfoRequest.class); // 解析请求参数
        LossOcrInfoResponse response = null;
        String result = "";
        String caseNo = request.getCaseNo();        // 案件号
        String caseUuid = request.getCaseUuid();    // 案件唯一标识
        String lossUuid = request.getLossUuid();    // 损失项唯一标识
        String lossType = request.getLossType();        // 损失类型
        String lossId = request.getLossId();            // 任务号
        try {
            if (StringUtils.isBlank(caseNo) || StringUtils.isBlank(caseUuid) || StringUtils.isBlank(lossUuid)) {
                response = MobileReturnCodeSupport.buildReponse(MobileReturnCodeSupport.CODE_NOVALID_PARAM, MobileReturnCodeSupport.SYS_CODE,
                        MobileReturnCodeSupport.CODE_PARAM_NO_NOT, LossOcrInfoResponse.class);
            } else {
                // 1、标的，2、三者
                PrpmOcrPayee params = new PrpmOcrPayee();
                params.setCaseNo(caseNo);
                params.setCaseInfoId(caseUuid);
                params.setLossItemId(lossUuid);
                /** 查询领款人信息 */
                PrpmOcrPayee res = ocrPayeeService.selectPayeeByCaseNo(params);
                /** 驾驶证行驶证信息 */
                PrpmOcrDriverLicense paramsLicense = new PrpmOcrDriverLicense();
                paramsLicense.setCaseNo(caseNo);
                paramsLicense.setLossType(lossType);
                paramsLicense.setLossId(lossId);
                paramsLicense.setLossItemId(lossUuid);
                PrpmOcrDriverLicense resLicense = ocrDrivelicenseService.selectDrivelicenseByCaseNo(paramsLicense);
                // 返回信息
                response = MobileReturnCodeSupport.buildReponse(MobileReturnCodeSupport.CODE_SUCCESS, MobileReturnCodeSupport.SYS_CODE, null,
                        LossOcrInfoResponse.class);
                // 通用信息
                response.setCaseNo(caseNo);
                response.setCaseUuid(caseUuid);
                response.setLossId(lossId);
                response.setLossUuid(lossUuid);
                // 领款人信息
                if (res != null) {
                    // 领款人身份证录入状态
                    if (StringUtils.isNotEmpty(res.getPayeeName()) && StringUtils.isNotEmpty(res.getPayeeCard())
                            && StringUtils.isNotEmpty(res.getInsuredPhone())) {
                        response.setPayeeIDInfoStatus("1");
                    } else {
                        response.setPayeeIDInfoStatus("0");
                    }
                    // 领款人银行卡录入状态
                    if (StringUtils.isNotEmpty(res.getBankCard()) && StringUtils.isNotEmpty(res.getCardType()) && StringUtils.isNotEmpty(res.getBankCode())) {
                        response.setPayeeBankInfoStatus("1");
                    } else {
                        response.setPayeeBankInfoStatus("0");
                    }
                    // 通用信息
                    response.setCaseNo(res.getCaseNo());
                    response.setCaseUuid(res.getCaseInfoId());
                    response.setLossId(lossId);
                    response.setLossUuid(res.getLossItemId());
                } else {
                    response.setPayeeIDInfoStatus("0");
                    response.setPayeeBankInfoStatus("0");
                }
                // 行驶证驾驶证
                if (resLicense != null) {
                    // 驾驶证收集录入状态
                    if (StringUtils.isNotEmpty(resLicense.getDriverLicense()) && StringUtils.isNotEmpty(resLicense.getDriver())
                    // &&StringUtils.isNotEmpty(resLicense.getFirstDate())&&
                    // StringUtils.isNotEmpty(resLicense.getValidity())
                    ) {
                        response.setDriveLicenseInfoStatus("1");
                    } else {
                        response.setDriveLicenseInfoStatus("0");
                    }
                    // 行驶证收集录入状态
                    if (StringUtils.isNotEmpty(resLicense.getLicensePlate()) && StringUtils.isNotEmpty(resLicense.getDrivingLicType()) &&
                    // StringUtils.isNotEmpty(resLicense.getBandModel())&&
                            StringUtils.isNotEmpty(resLicense.getIssueDate())) {
                        response.setDepartLicenseInfoStatus("1");
                    } else {
                        response.setDepartLicenseInfoStatus("0");
                    }
                    // 通用信息
                    response.setCaseNo(resLicense.getCaseNo());
                    response.setCaseUuid(resLicense.getCaseInfoId());
                    response.setLossId(resLicense.getLossId());
                    response.setLossUuid(resLicense.getLossItemId());
                } else {
                    response.setDriveLicenseInfoStatus("0");
                    response.setDepartLicenseInfoStatus("0");
                }
            }
        } catch (Exception e) {
            LogUtils.error("MP69查询OCR收集信息的录入情况==>错误信息:", e);
            response = MobileReturnCodeSupport.buildReponse(MobileReturnCodeSupport.CODE_INTERNAL_ERROR, MobileReturnCodeSupport.SYS_CODE, null,
                    LossOcrInfoResponse.class);
        } finally {
            result = decorateResult("MP69查询OCR收集信息的录入情况", response);
        }
        return result;
    }
}
